package com.ruoyi.common.utils;

import java.util.Locale;

public class OsCheckUtils {

    public enum OS {
        WINDOWS, MAC, LINUX, OTHER
    }

    public static OS getOperatingSystemType() {
        String os = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
        if ((os.contains("mac")) || (os.contains("darwin"))) {
            return OS.MAC;
        } else if (os.contains("win")) {
            return OS.WINDOWS;
        } else if (os.contains("nux")) {
            return OS.LINUX;
        } else {
            return OS.OTHER;
        }
    }
}
